﻿<Window x:Class="CPPEI.Coolzon.UI.XProperty.Editors.DataSourceEditWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.UI.XProperty.Editors"
        mc:Ignorable="d"
        Title="选择数据源" Height="456" Width="700" ShowInTaskbar="False" Topmost="True" WindowStartupLocation="CenterScreen" Loaded="Window_Loaded"
        Style="{DynamicResource WindowStyle}">
    <Window.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="FontSize" Value="20"/>
        </Style>
    </Window.Resources>
    <Grid>
        <GroupBox x:Name="_ctlGroupBoxZero" Header="" Visibility="Visible">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid x:Name="_ctlViewGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="数据源类型:" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSourceType_Pandect" Grid.Row="0" Grid.Column="1" Text="" Margin="5"/>
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="数据源名称:" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSource_Pandect" Grid.Row="1" Grid.Column="1" Text="" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSetTB_Pandect" Grid.Row="2" Grid.Column="0" Text="数据集名称:" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSet_Pandect" Grid.Row="2" Grid.Column="1" Text="" Margin="5"/>
                    <TextBlock x:Name="_ctlParams_Pandect" Grid.Row="3" Grid.Column="0" Text="参数:" HorizontalAlignment="Right" Margin="5"/>
                    <Grid Name="_ctlParamsList_Pandect" Grid.Row="3" Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                    </Grid>
                </Grid>
                <StackPanel Grid.Row="2" Margin="0,5,0,3" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="重新选择" Margin="0,0,10,0" Click="_alter_Click" Width="75"></Button>
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="确 定" Margin="0,0,0,0" Click="_button_Click" Width="75"></Button>
                </StackPanel>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="_ctlGroupBoxFirst" Header="请选择数据源类型" Visibility="Collapsed">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" >
                    <RadioButton x:Name="_ctlStaticRB" Content="静态数据源" FontSize="20" Margin="15"/>
                    <RadioButton x:Name="_ctlOnlineRB" Content="在线数据源" FontSize="20" Margin="15"/>
                </StackPanel>
                <StackPanel Grid.Row="1" Margin="0,5,0,3" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  x:Name="_ctlPreInFirst" Content="上一步" Margin="0,0,10,0" Click="_preInFirst_Click" Width="75"></Button>
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="下一步" Margin="0,0,0,0" Click="_nextInFirst_Click" Width="75"></Button>
                </StackPanel>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="_ctlGroupBoxSecond" Header="请选择数据源" Visibility="Collapsed">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Style="{DynamicResource ButtonPanelBackground}"  Grid.Row="0" Orientation="Horizontal">
                    <TextBox x:Name="_ctlDataSourceFilter" Margin="3" Width="180" PreviewKeyDown="_ctlDataSourceFilter_PreviewKeyDown"/>
                    <Button Content="过滤" Margin="3" Click="_filterInSecond_Click" />
                </StackPanel>
                <DataGrid x:Name="_ctlDataSource" Grid.Row="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" SelectionUnit="FullRow" IsReadOnly="True" SelectionMode="Single" >
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="名称" CanUserSort="True"  Binding="{Binding Name}"/>
                    </DataGrid.Columns>
                </DataGrid>
                <StackPanel Grid.Row="2" Margin="0,5,0,3" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="上一步" Margin="0,0,10,0" Click="_preInSecond_Click" Width="75"></Button>
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="下一步" Margin="0,0,0,0" Click="_nextInSecond_Click" Width="75"></Button>
                </StackPanel>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="_ctlGroupBoxThird" Header="请选择数据集" Visibility="Collapsed">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Style="{DynamicResource ButtonPanelBackground}"  Grid.Row="0" Orientation="Horizontal">
                    <TextBox x:Name="_ctlDataSetFilter" Margin="3" Width="180" PreviewKeyDown="_ctlDataSetFilter_PreviewKeyDown"/>
                    <Button Content="过滤" Margin="3" Click="_filterInThird_Click" />
                </StackPanel>
                <DataGrid x:Name="_ctlDataSet" Grid.Row="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" SelectionUnit="FullRow" IsReadOnly="True" SelectionMode="Single"  >
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="名称" CanUserSort="True"  Binding="{Binding Name}"/>
                    </DataGrid.Columns>
                </DataGrid>
                <StackPanel Grid.Row="2" Margin="0,5,0,3" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="上一步" Margin="0,0,10,0" Click="_preInThird_Click" Width="75"></Button>
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="下一步" Margin="0,0,0,0" Click="_nextInThird_Click" Width="75"></Button>
                </StackPanel>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="_ctlGroupBoxForth" Header="请设置参数" Visibility="Collapsed">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid Name="_ctlParams" Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                </Grid>
                <StackPanel Grid.Row="2" Margin="0,5,0,3" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="上一步" Margin="0,0,10,0" Click="_preInForth_Click" Width="75"></Button>
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="下一步" Margin="0,0,0,0" Click="_nextInForth_Click" Width="75"></Button>
                </StackPanel>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="_ctlGroupBoxFifth" Header="确 认" Visibility="Collapsed">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid x:Name="_ctlConfirmGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="数据源类型:" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSourceTypeTB_Confirm" Grid.Row="0" Grid.Column="1" Text="" Margin="5"/>
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="数据源名称:" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSourceTB_Confirm" Grid.Row="1" Grid.Column="1" Text="" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSetTB_Confirm" Grid.Row="2" Grid.Column="0" Text="数据集名称:" Margin="5"/>
                    <TextBlock x:Name="_ctlDataSet_Confirm" Grid.Row="2" Grid.Column="1" Text="" Margin="5"/>
                    <TextBlock Name="_ctlParamsListTB_Confirm" Grid.Row="3" Grid.Column="0" Text="参数:" HorizontalAlignment="Right" Margin="5"/>
                    <Grid Name="_ctlParamsList_Confirm" Grid.Row="3" Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                    </Grid>
                </Grid>
                <StackPanel Grid.Row="2" Margin="0,5,0,3" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="上一步" Margin="0,0,10,0" Click="_preInFifth_Click" Width="75"></Button>
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="完 成" Margin="0,0,0,0" Click="_nextInFifth_Click" Width="75"></Button>
                </StackPanel>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="_ctlGroupBoxStaticDataSource" Header="请选择静态数据源" Visibility="Collapsed">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Style="{DynamicResource ButtonPanelBackground}"  Grid.Row="0" Orientation="Horizontal">
                    <TextBox x:Name="_ctlStaticDataSourceFilter" Margin="3" Width="180" PreviewKeyDown="_ctlStaticDataSourceFilter_PreviewKeyDown"/>
                    <Button Content="过滤" Margin="3" Click="_filterInStatic_Click" />
                </StackPanel>
                <DataGrid Name="_ctlStaticDataGrid" Grid.Row="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" SelectionUnit="FullRow" IsReadOnly="True"  SelectionMode="Single" >
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="名称" CanUserSort="True"  Binding="{Binding Name}"/>
                    </DataGrid.Columns>
                </DataGrid>
                <StackPanel Grid.Row="2" Margin="0,5,0,3" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="上一步" Margin="0,0,10,0" Click="_preInStatic_Click" Width="75"></Button>
                    <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="下一步" Margin="0,0,0,0" Click="_nextInStatic_Click" Width="75"></Button>
                </StackPanel>
            </Grid>
        </GroupBox>
    </Grid>
</Window>
